
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<title>Contact Shuffle</title>
		<script src="https://www.google.com/jsapi?key=ABQIAAAAj4TFaCtWPLpw3N7xrVWtXhQuo_9668RoLKWHtlpW7pympgCPWxTQm8Rfb-q_NBMIc_2riWIl80RfWw" type="text/javascript"></script>
    <%= javascript_include_tag :defaults %>
		<%= stylesheet_link_tag 'screen.css' %>    

</head>
<body>
  
<% if session[:token].nil? %>

<h2> no session token : <a href="https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fwww.contactshuffle.com&scope=http%3A%2F%2Fwww.google.com%2Fm8%2Ffeeds%2F&session=1&secure=0">Login</a></h2>

<% else %>

<h2> session token :  <%= @user %> (<a href=".?logout=1">logout</a>)</h2> 
<form name="input" action="." method="get">
<input type="hidden" value="<%= session[:token] %>">
<!-- <input type="text" name="searchterms" value="<%= params[ :searchterms ] %>"/> -->
<input type="text" name="contactid">
<input type="text" name="contactemail">
<input type="submit" name="search" value="add contact">
</form>

<h3> <%= @action %> </h3>


 <%= @contacts %>
 





<% end %>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-28501240-1']);
  _gaq.push(['_setDomainName', 'contactshuffle.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</body>
</html>
